package ini_reader

import (
	"bufio"
	"os"
)

// Load : Load configure from .ini file
func Load(fileName string) config {

	file, err := os.Open(fileName)
	if err != nil {
		panic(ErrOpenFile)
	}
	defer file.Close()

	reader := bufio.NewReader(file)
	cfg := parse(reader)
	return cfg

}